package com.xh.shuati.common;

/**
 * 自定义错误码
 *
 * @author <a href="https://github.com/canon0521">xh</a>
 */
public enum ErrorCode {

    SUCCESS(200,"成功"),
    PARAMS_ERROR(400,"参数错误"),
    NOT_LOGIN(401,"未注册"),
    NOT_REGION(402,"未登录"),
    NO_AUTH(403,"权限不足"),
    NOT_VIP(404,"需要VIP"),
    NOT_FOUND(405,"未找到"),
    NOT_VISIT(406,"禁止访问"),
    UNKNOW_ERROR(500,"未知错误"),
    OPERATION_ERROR(501,"操作失败"),
    SYSTEM_ERROR(502,"系统错误");


    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
